Skip to content

build: pin actions/github-script to commit SHA in pull_request_target workflow#3559

Open
XananasX7 wants to merge 1 commit into
tensorflow:mainfrom
XananasX7:patch-1
Open

build: pin actions/github-script to commit SHA in pull_request_target workflow#3559
XananasX7 wants to merge 1 commit into
tensorflow:mainfrom
XananasX7:patch-1

Conversation

@XananasX7
Copy link
Copy Markdown

@XananasX7 XananasX7 commented May 16, 2026

Pin actions/github-script to full commit SHA instead of mutable v8 tag
in the pr_test.yml workflow.

This workflow uses pull_request_target trigger with access to
secrets.TFLM_BOT_REPO_TOKEN. Pinning to SHA ensures immutability
and prevents supply chain attacks via tag manipulation.

Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

@XananasX7 XananasX7 requested a review from veblush as a code owner May 16, 2026 01:08
@XananasX7
Copy link
Copy Markdown
Author

Summary

This PR pins actions/github-script to a full commit SHA in the pull_request_target workflow.

Why this matters

This workflow uses pull_request_target — a trigger that runs in the context of the base repository with access to repository secrets, including TFLM_BOT_REPO_TOKEN. The current actions/github-script@v7 tag is mutable and could be redirected by a supply chain attack.

Fix

Pinned to the exact commit SHA of actions/github-script at v7, with the version annotated in a comment. This is a one-line, no-logic change that eliminates the supply chain risk.

CLA signed. Ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant